# Contributor: Nicolas Lorin <androw95220@gmail.com>
# Maintainer: Tycho Andersen <tycho@docker.com>
pkgname=policycoreutils
pkgver=3.3
pkgrel=1
pkgdesc="SELinux policy core utilities"
url="https://selinuxproject.org/"
arch="all"
license="GPL-2.0-only"
makedepends="
	gettext-dev
	libsepol-dev
	libselinux-dev
	libsemanage-dev
	fts-dev
	linux-pam-dev
	libcap-ng-dev
	audit-dev
	gawk
	"
subpackages="$pkgname-doc $pkgname-lang $pkgname-bash-completion"
source="https://github.com/SELinuxProject/selinux/releases/download/$pkgver/policycoreutils-$pkgver.tar.gz
	0002-hack-around-GLOB-BRACE-TILDE.patch
	busybox-install-compat.patch
	"
options="suid"

build() {
	make LDLIBS="$LDLIBS -lintl" LSPP_PRIV=y
}

package() {
	make LSPP_PRIV=y DESTDIR="$pkgdir" install
}

sha512sums="
db658990355f99a8e43f53d20cc67bf9e557b0a7837d1927c80f325b7f93ad47876382278a980b818484d6e31712a9b03e279f947ebc88c4be60a9f395607f98  policycoreutils-3.3.tar.gz
d611ca3107439fbdb9618a72f55cb66e299fa71392821b223343aa314c65af3e67d6e79ff40e93eca9a20dd0e90c660393c604a18048fcf293374cf2bc61e918  0002-hack-around-GLOB-BRACE-TILDE.patch
4f6ccc3ce6d88a85c5550d55fb6b8bb3ca601bb3996b68964e31b790273a3a27f33e1ae420c4bd64964270a6cf97501344a27c3d5f0210c825e88378be07bd49  busybox-install-compat.patch
"
